USE [GD1C2012]
GO

/****** Object:  Table [SUPERACIDOS].[Asignacion]    Script Date: 06/11/2012 09:26:36 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [SUPERACIDOS].[Asignacion](
	[Asignacion_AutoId] [int] NOT NULL,
	[Asignacion_ChoferId] [int] NOT NULL,
	[Asignacion_TurnoId] [int] NOT NULL,
	[Asignacion_Fecha] [datetime] NOT NULL,
 CONSTRAINT [PK_Asignacion] PRIMARY KEY CLUSTERED 
(
	[Asignacion_AutoId] ASC,
	[Asignacion_TurnoId] ASC,
	[Asignacion_Fecha] ASC,
	[Asignacion_ChoferId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [SUPERACIDOS].[Asignacion]  WITH CHECK ADD  CONSTRAINT [FK_Asignacion_Auto] FOREIGN KEY([Asignacion_AutoId])
REFERENCES [SUPERACIDOS].[Auto] ([Auto_Id])
GO

ALTER TABLE [SUPERACIDOS].[Asignacion] CHECK CONSTRAINT [FK_Asignacion_Auto]
GO

ALTER TABLE [SUPERACIDOS].[Asignacion]  WITH CHECK ADD  CONSTRAINT [FK_Asignacion_Chofer] FOREIGN KEY([Asignacion_ChoferId])
REFERENCES [SUPERACIDOS].[Chofer] ([Chofer_Id])
GO

ALTER TABLE [SUPERACIDOS].[Asignacion] CHECK CONSTRAINT [FK_Asignacion_Chofer]
GO

ALTER TABLE [SUPERACIDOS].[Asignacion]  WITH CHECK ADD  CONSTRAINT [FK_Asignacion_Turno] FOREIGN KEY([Asignacion_TurnoId])
REFERENCES [SUPERACIDOS].[Turno] ([Turno_Id])
GO

ALTER TABLE [SUPERACIDOS].[Asignacion] CHECK CONSTRAINT [FK_Asignacion_Turno]
GO

